<template>
  <el-dialog
    :close-on-click-modal="false"
    :close-on-press-escape="false"
    :title="title"
    :visible.sync="dialogFormVisible"
    append-to-body
    width="650px"
    top="30px"
    @close="close"
  >
    <el-image
      style="width: 100%; height: 350px"
      :src="src"
      fit="contain"
    ></el-image>
    <div slot="footer" class="dialog-footer">
      <el-button type="primary" @click="close">确 定</el-button>
    </div>
  </el-dialog>
</template>

<script>
  export default {
    name: 'ImgDialog',
    data() {
      return {
        src: '',
        title: '',
        dialogFormVisible: false,
      }
    },
    methods: {
      showEdit(title, src) {
        this.title = title
        this.src = src
        this.dialogFormVisible = true
      },
      close() {
        this.dialogFormVisible = false
      },
    },
  }
</script>
